<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>欢迎界面</title>
</head>
<body>
<h1 style="text-align: center"><span id="email"></span>, 欢迎登录系统！</h1>
<script src="js/libs/jquery.js"></script>
<script type="text/javascript">
    let url = `/api/user/info`;

    $.ajax({
        url: url,
        statusCode: {
            401: () => {
                console.log("401.....");
                window.location.href = "/login.html";
            }
        },
        success: (data) => {
            let email = data;
            $("#email").text(email);
        }
    });

</script>
</body>
</html>